package com.bng8.superstar_cms.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 用户表
 *
 * @TableName sup_user
 */
@TableName(value = "sup_user")
@Data
public class SupUserDO implements Serializable {
    /**
     * serialVersionUID
     */
    @TableField(exist = false)
    private static final long serialVersionUID = 3398912890394078309L;

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 用户名
     */
    @TableField(value = "user_name")
    private String userName;

    /**
     * 密码
     */
    @TableField(value = "password")
    private String password;

    /**
     * 用户昵称
     */
    @TableField(value = "nick_name")
    private String nickName;

    /**
     * 邮箱
     */
    @TableField(value = "email")
    private String email;

    /**
     * 挑战者
     */
    @TableField(value = "challenger")
    private String challenger;

    /**
     * 创建时间
     */
    @TableField(value = "gmt_create", fill = FieldFill.INSERT)
    private LocalDateTime gmtCreate;

    /**
     * 修改时间
     */
    @TableField(value = "gmt_update", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime gmtUpdate;

    /**
     * 创建者
     */
    @TableField(value = "creator", fill = FieldFill.INSERT)
    private String creator;

    /**
     * 修改人
     */
    @TableField(value = "operator", fill = FieldFill.INSERT_UPDATE)
    private String operator;

    /**
     * 1：有效 — 1：无效（删除时置为-1）
     */
    @TableField(value = "deleted", fill = FieldFill.INSERT)
    @TableLogic
    private Integer deleted;

    /**
     * 数据版本号
     */
    @Version
    @TableField(value = "version", fill = FieldFill.INSERT)
    private Long version;
}